<template>
  <div>
    <div class="smeil">
      <div class="two">
        <span>音乐故事|这有一个故事陪你听歌</span>
        <p>更多></p>
      </div>
      <div class="cv">
        <div class="three" v-for="(v, i) in m" :key="i">
          <div class="two-">
            <img :src="v.imgurl" class="night" />
            <i>{{ v.list | musicianName }}</i>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getlink } from "@/api/getlink.js";
export default {
  data() {
    return {
      music: [],
    };
  },
  computed: {
    m() {
      return this.music.slice(0, 15);
    },
  },
  mounted() {
    getlink("/bb/tmusic").then((ok) => {
      this.music = ok.data;
    });
  },
  filters: {
    musicianName(val) {
      if (val.length > 8) {
        return val.substr(0, 8) + "..";
      } else {
        return val;
      }
    },
  },
};
</script>

<style scoped>
.two {
  padding-left: 0.3rem;
  padding-right: 0.25rem;
  height: 0.5rem;
}
span {
  float: left;
  font-size: 0.34rem;
  font-weight: 700;
}
p {
  float: right;
  font-size: 0.24rem;
  border: 1px solid gray;
  border-radius: 0.2rem;
  line-height: 0.5rem;
  width: 1.3rem;
  text-align: center;
}
img {
  width: 2.14rem;
  height: 2.14rem;
  margin: auto;
  border-radius: 0.2rem;
}
.two- {
  width: 2.14rem;
  height: 2.9rem;
}
.cv {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
}
.smeil {
  margin-bottom: 0.5rem;
}
</style>
